]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Use g_shell_parse_argv() in run dialog
authorDan Winship <danw@gnome.org>
Mon, 10 Aug 2009 19:49:25 +0000 (15:49 -0400)
committerDan Winship <danw@gnome.org>
Tue, 18 Aug 2009 22:17:02 +0000 (18:17 -0400)
http://bugzilla.gnome.org/show_bug.cgi?id=581137

configure.ac
js/ui/runDialog.js

index 7aafb2a33935cf8da1ab50b4917d65ea65bd3348..9b660239f345c9de559489d0c21a6d627dfec799 100644 (file)
@@ -50,7 +50,8 @@ AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)
 PKG_CHECK_MODULES(MUTTER_PLUGIN, gio-unix-2.0 gtk+-2.0 dbus-glib-1 mutter-plugins
                                  gjs-gi-1.0 libgnome-menu $recorder_modules gconf-2.0
                                  gdk-x11-2.0 clutter-x11-1.0 clutter-glx-1.0
-                                 gnome-desktop-2.0 >= 2.26 libstartup-notification-1.0)
+                                 gnome-desktop-2.0 >= 2.26 libstartup-notification-1.0
+                                 gobject-introspection-1.0 >= 0.6.4)
 PKG_CHECK_MODULES(TIDY, clutter-1.0)
 PKG_CHECK_MODULES(BIG, clutter-1.0 gtk+-2.0 librsvg-2.0)
 PKG_CHECK_MODULES(GDMUSER, dbus-glib-1 gtk+-2.0)
index 5ba561b57b21c52abf84c834859f6eed402008ea..5d68bb83222fb24badc9acb3ea1adf41fe252de3 100644 (file)
@@ -2,6 +2,7 @@
 
 const Big = imports.gi.Big;
 const Clutter = imports.gi.Clutter;
+const GLib = imports.gi.GLib;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const Shell = imports.gi.Shell;
@@ -108,12 +109,13 @@ RunDialog.prototype = {
         if (f) {
             f();
         } else if (command) {
-            var p = new Shell.Process({'args' : [command]});
             try {
+                let [ok, len, args] = GLib.shell_parse_argv(command);
+                let p = new Shell.Process({'args' : args});
                 p.run();
             } catch (e) {
                 // TODO: Give the user direct feedback.
-                log('Could not run command ' + command + '.');
+                log('Could not run command ' + command + ': ' + e);
             }
         }
     },